package com.design.create.singleton;

/**
 * 同步锁实现懒汉式单例
 */
public class SyncLazySingleton {

    private SyncLazySingleton() {}

    private static SyncLazySingleton syncLazySingleton = null;

    public static SyncLazySingleton getInstance() {
        if (syncLazySingleton == null) {
            syncLazySingleton = new SyncLazySingleton();
        }
        return syncLazySingleton;
    }
}
